#pragma once
#include "../Utilities/Math.h"

struct LightSourse {    
	Vector4 ambient;          // Aclarri    
	Vector4 diffuse;            // Dcli    
	Vector4 specular;          // Scli    
	Vector4 position;           // Ppli    
	Vector4 halfVector;       // Derived: Hi  

	//use for spot light
	Vector3 spotDirection;   // Sdli    
	float spotExponent;  // Srli    
	float spotCutoff;      // Crli                      
       // (range: [0.0,90.0], 180.0)
	float spotCosCutoff; // Derived: cos(Crli)  
        // (range: [1.0,0.0],-1.0)   

	//use for point light
	float constantAttenuation;   // K0    
	float linearAttenuation;       // K1    
	float quadraticAttenuation; // K2   
};  

struct Material 
{    
   Vector4 emission;    // Ecm    
   Vector4 ambient;     // Acm    
   Vector4 diffuse;       // Dcm    
   Vector4 specular;    // Scm    
   float shininess;   // Srm //?  
};    // Shininess=0: the object complete have no reflect 

struct LightModel 
{ 
   Vector4 ambient;  // Acs 
};

class glLighting
{
protected:
	static glLighting* l_Instance;
	glLighting();
	~glLighting();
	glLighting& operator = (const glLighting &){};

public:
	static glLighting* GetInstance();
	static void DestroyInstance();
	LightSourse Light;
};

